{% extends "simgenex/base_simgenex.html" %}
{% load ts_extras %}
{%block center%}
{% include "simgenex/addInstructionModal.html" %}

<div class="edit_form" >
    <h2 class="title">Measurement Matrix Settings</h2>
    <form action="add" method="post" class="edit">
    {% csrf_token %}
    <fieldset>
        <legend><label>Measurement Process</label></legend>
        <span class="helptext"> Specifying how individual gene expression values are normalized</span>
        <div id="transformation" class="input_field" >
            <label>Transformation Method</label>
            <span class="helptext">Select the transformation expression applied to raw expression level matrix</span>
            <select name="transformation" >
                <option title="The expression level values from raw simulation matrix are transform linearly to measurement matrix" value="linear"> linear </option>
                <option title="The expression level are transformed from raw simulation matrix to measurement matrix using log operation"value="log">log</option>
                <option title="The expression level are transformed from raw simulation matrix to measurement matrix by using log-ratio between current column and a reference column"value="log-ratio">log-ratio</option>
            </select>
        </div>
        <div id="offset" class="input_field" >
            <label>Offset</label>
            <span class="helptext">Set the offset for the transformation expression</span>
            <input type="text" name="offset" />
        </div>
        <div id="reference_column" class="input_field">
            <label for="reference_column">Reference Column</label>
            <span class="helptext">Choose the reference column to apply log-ratio transformation</span>
            <select name="reference">
                {% for simex in request.session.sgx_program.sgx.simexpression_defs %}
                    {% for col in simex.get_simulated_column_header_list %}
                    <option value="{{col}}">{{col}}</option>
                    {% endfor %}
                {% endfor %}
            </select>
        </div>

    </fieldset>
    <fieldset>
        <legend><label>Measurement Columns</label></legend>
        <span class="helptext">Specifying the columns in the simulated matrix. (It is generated by default, if you wish to change it, click "Edit" button below.)</span>
        <a id="measurement_columns" href="{%url sgx.views.viewSgx request.session.sgx_program.name|escapeUrl%}"  class="link-button">Edit</a>
    </fieldset>
    <fieldset>
        <legend><label>Gene Mapping</label></legend>
        <span class="helptext">Specifying names of genes in the computational model that can be mapped to names in the target matrix. (It is generated by default, if you wish to change it, click "Edit" button below.)</span>
        <a id="gene_mapping" href="#" class="link-button">Edit</a>
    </fieldset>        
        <div>
            <button type="submit" name="submit" > Submit</button>
        </div>
    </form>
</div>
{% endblock %}